MATLAB Optimization Techniques by César Pérez López

MATLAB Optimization Techniques by César Pérez López

Author:César Pérez López
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


>> [x,fval] = fminsearch(inline('100*(x(2)-x(1)^2)^2+...

1-x (1)) ^ 2'), [- 1.2, 1])

x =

1.0000 1.0000

FVal =

8. 1777e-010

The following example computes a zero of the sine function near 3 and a zero of the cosine function between 1 and 2.

>> x = fzero(@sin,3)

x =

3.1416

>> x = fzero(@cos,[1 2])

x =

1.5708

7.6 Conditional Minima and Maxima. The Method of “Lagrange Multipliers”

Suppose we want to optimize (i.e. maximize or minimize) the function f(x1,x2,…,xn) , called the objective function, but subject to certain restrictions given by the equations:

g 1 (x 1 ,x 2 ,…,x n )=0

g 2 (x 1 ,x 2 ,…,x n )=0

...............

g k (x 1 ,x 2 ,…,x n )=0

This is the setting in which the Lagrangian is introduced. The Lagrangian is a linear combination of the objective function and the constraints, and has the following form:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.